/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.ta.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 事务申请Entity
 * @author 刘雨轩
 * @version 2017-05-26
 */
public class StWorkflow extends DataEntity<StWorkflow> {
	
	private static final long serialVersionUID = 1L;
	private String wid;		// 流程ID
	private String wname;		// 流程名称
	private Long timeout;		// 超期时间
	private Integer version;		// 版本号
	private Integer rot;		// 0-最新版本
	private Date modifyTime;		// 更新时间
	private String memo;		// 备注
	private Long exalarmtime;		// 警告时间
	private Integer type;		// type
	private String cbcsCq;		// 承办处室_CQ
	private String xmlWorkflow;		// 流程定义存储
	
	public StWorkflow() {
		super();
	}

	public StWorkflow(String id){
		super(id);
	}

	@Length(min=1, max=36, message="流程ID长度必须介于 1 和 36 之间")
	public String getWid() {
		return wid;
	}

	public void setWid(String wid) {
		this.wid = wid;
	}
	
	@Length(min=1, max=64, message="流程名称长度必须介于 1 和 64 之间")
	public String getWname() {
		return wname;
	}

	public void setWname(String wname) {
		this.wname = wname;
	}
	
	@NotNull(message="超期时间不能为空")
	public Long getTimeout() {
		return timeout;
	}

	public void setTimeout(Long timeout) {
		this.timeout = timeout;
	}
	
	@NotNull(message="版本号不能为空")
	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}
	
	@NotNull(message="0-最新版本不能为空")
	public Integer getRot() {
		return rot;
	}

	public void setRot(Integer rot) {
		this.rot = rot;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="更新时间不能为空")
	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}
	
	@Length(min=0, max=255, message="备注长度必须介于 0 和 255 之间")
	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}
	
	public Long getExalarmtime() {
		return exalarmtime;
	}

	public void setExalarmtime(Long exalarmtime) {
		this.exalarmtime = exalarmtime;
	}
	
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
	
	@Length(min=0, max=64, message="承办处室_CQ长度必须介于 0 和 64 之间")
	public String getCbcsCq() {
		return cbcsCq;
	}

	public void setCbcsCq(String cbcsCq) {
		this.cbcsCq = cbcsCq;
	}
	
	public String getXmlWorkflow() {
		return xmlWorkflow;
	}

	public void setXmlWorkflow(String xmlWorkflow) {
		this.xmlWorkflow = xmlWorkflow;
	}
	
}